package com.example.demo.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author lyx
 * @date 2020/10/26 21:17
 */
@Data
@NoArgsConstructor
public class UserSimple  {

    public static final int COMMON=0;

    public static final int ADMIN=1;

    private Integer userId;

    private String account;

    /**
     * 区分普通用户和管理员
     */
    private Integer state;

    private String photo;

    private String nickname;

    private String phone;

    private String mail;



    private List<Operation> operations;

    public UserSimple(User user){
        this.userId = user.getUserId();
        this.account = user.getAccount();
        this.state = user.getState();
        this.phone = user.getPhone();
        this.photo = user.getPhoto();
        this.mail = user.getMail();
        this.nickname = user.getNickname();
    }


}
